﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IronLua
{
    internal static class ClrInterop
    {
        public static IEnumerable<object> ToClrValues(IEnumerable<Value> values)
        {
            return values.Select(v => v.ToClrValue());
        }

        public static IEnumerable<Value> ToLuaValues<T>(IEnumerable<T> values)
        {
            return values.Select(v => Value.FromAny((object)v));
        }

        public static ICollection<Value> ToLuaValueCollection<T>(IEnumerable<T> values)
        {
            return values.Select(v => Value.FromAny((object)v)).ToList(); 
        }
    }
}
